package com.song.demo11springboottask.controller;

import com.song.demo11springboottask.service.AsyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试异步
 */
@RestController
public class AsynController {

    @Autowired
    AsyncService asyncService;


    @RequestMapping("/hello")
    public String hello(){
        asyncService.hello(); // 停止5s执行
        return "ok";
    }

}
